﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Cuckoo.TaskSchedule
{
	/// <summary>
	/// 任务处理策略接口
	/// </summary>
	internal interface ITaskStrategy
	{
		/// <summary>
		/// 注册任务
		/// </summary>
		/// <param name="task"></param>
		void RegisterTask(ITask task);

		/// <summary>
		/// 注销任务
		/// </summary>
		/// <param name="task"></param>
		void UnRegisterTask(ITask task);

		/// <summary>
		/// 解析任务的时间表达式
		/// </summary>
		/// <param name="task">待解析的任务</param>
		/// <returns>解析结果</returns>
		void ParseExpress(ITask task, ITimer timer);
	}
}
